package Decorator;


import java.awt.Graphics;
import javax.swing.JPanel;

public abstract class Decorator extends Item {
	protected Item _item;

	public Decorator(JPanel pan, Item p_item) {
		super(pan);
		_item = p_item;
	}
	
	public void setItem(Item p_item)
	{
		_item = p_item;
	}

	public void paintComponent(Graphics g) {
		//Nous appelons la m�thode de la super-classe
		super.paintComponent(g);
		//Enfin nous appelons la m�thode de notre instance !
		_item.paintComponent(g);
	}
}
